package cn.leaf.cloud.config;

import cn.leaf.cloud.filter.TraceFilter;
import cn.leaf.cloud.props.LeafRequestProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *
 * description: 请求配置，包括tracId和其他网络请求
 *
 * @author twinkle leaf
 * @version v1.0.0
 * @since 2021-11-06 18:02:59
 * slogan: There are no two identical leaves in the world.
 *
 */
@Configuration
@EnableConfigurationProperties(LeafRequestProperties.class)
public class    RequestConfiguration {

//    @Bean
//    public TenantContextHolderFilter tenantContextHolderFilter() {
//        return new TenantContextHolderFilter();
//    }

    @Bean
    public TraceFilter traceFilter() {
        return new TraceFilter();
    }

}
